<template>
  <div class="note">
    <iframe :src="$store.state.url" frameborder="0"></iframe>
    <el-button type="primary" icon="el-icon-back" circle="" @click="logout"></el-button>
  </div>
</template>

<script>
export default {
  created () {
    if (!this.$store.state.url) {
      this.$message.warning('为了安全考虑，你不能直接访问该路径')
      this.$router.push('/home')
    }
  },
  methods: {
    logout () {
      this.$router.go(-1)
    }
  }
}
</script>

<style lang="less" scoped>
  .note,
  iframe {
    width: 100%;
    height: 100vh;
  }
  .el-button {
    position: absolute;
    bottom: 5%;
    left: 2%;
  }
</style>
